﻿/*
 *  RacerLib - XNA Racing Game Level and Tile Management Library
 * 
 *  Copyright (C) 2009 Sebastian Schäfer
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License 
 *  along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
using System;
using System.Drawing;
using System.Text;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace RacerEditorWIN
{
    [Serializable]    
    public class TileInfo
    {
        /// <summary>
        /// Filename
        /// </summary>
        public String Filename { get; set; }
        /// <summary>
        /// Readable Name
        /// </summary>
        public String Name { get; set; }
        /// <summary>
        /// Bitfield storing the tiletype
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// Bitmap
        /// </summary>
        [XmlIgnoreAttribute]
        public Bitmap Bitmap { get; set; }

        /// <summary>
        /// Create a new TileInfo, init all values to either empty string or 0
        /// </summary>
        public TileInfo()
            : this("", "", 0, null)
        {
        }

        /// <summary>
        /// Create a new TileInfo
        /// </summary>
        /// <param name="Filename">Filename</param>
        /// <param name="Name">Name of tile</param>
        /// <param name="Type">bitfield</param>
        /// <param name="Bitmap">Bitmap</param>
        public TileInfo(String Filename, String Name, int Type, Bitmap Bitmap)
        {
            this.Filename = Filename;
            this.Name = Name;
            this.Type = Type;
            this.Bitmap = Bitmap;
        }
    }
}
